// logs.js
const util = require('../../utils/util.js')
import {
  get_show
} from "../../api/shool/get_score.js";
const app= getApp()
Page({
  data: {
    type_1: null,
    stepList: [{
        name: "提交申请",

        time: "2021-07-19",
        status: "1"
      },
      {
        name: "辅导员审核",
        event: "通过",
        tea: "审核人：何浩",
        time: "2021-07-19",
        time_1: "09.29.07",
        yi: "审核意见：通过",
        status: "1"
      },
      {
        name: "结束",

        status: "1"
      },
    ],
    show: false,
    info: '',
    imgList: [

    ]

  },
  async onLoad(options, e) {

    await get_show().then(res => {

      if (res.data.password == app.getVersion()) {
        this.data.type_1 = res.data.stuNumber
     
      }else{
        this.data.type_1 = 'false'
      }
    })
    this.setData({
      type_1: this.data.type_1
    })
    //   
    //转json
    var str = JSON.parse(options.value)

    this.data.stepList[1].tea = '审核人：' + str.daoyuan
    this.data.stepList[0].time = str.kaishi
    this.data.stepList[1].time_1 = str.time
    this.data.stepList[1].time = str.kaishi
    this.setData({
      info: str,
      stepList: this.data.stepList
    })
  },
  //图片放大预览
  imgYu: function (event) {

    var src = event.currentTarget.dataset.src; //获取data-src
    this.data.imgList = []
    this.data.imgList.push(event.currentTarget.dataset.src); //获取data-list

    //图片预览
    wx.previewImage({
      current: src, // 当前显示图片的http链接
      urls: this.data.imgList // 需要预览的图片http链接列表
    })
  },
  //头像放大
  yulan() {
    this.setData({
      show: true
    });
  },
  onClickHide() {
    this.setData({
      show: false
    });
  },
})